<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>第一个javascript程序</title>
</head>
<body>
    <button onclick="showDate()">点我显示时间</button>
    <div id="demo">
      
    </div>
    <script>
        let showDate = function(){
            document.getElementById("demo").innerHTML=new Date();
        }
    </script>
</body>
</html>